home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Tools / TRW2000 for Win9x v1.22 / PLUGSDK / HELLO / HELLO.CPP next >
Encoding:
C/C++ Source or Header  |  2000-02-24  |  1.5 KB  |  87 lines

  1. // Hello Plugs for NDW 1.00 for Windows 9x
  2. // Copyright (C) , 1999 ,
  3. //
  4. // Author:
  5. //           Zhunanhao  , reached at nhzhu@163.net
  6. //
  7. // History :
  8. //    1999.4.4 , Zhunanhao write origin code .
  9. //    2000.2.22  Zhunanhao re-write to TRW2000    
  10. //
  11. // Note:
  12. //           This is only a DEMO !
  13. //
  14.  
  15. #include <wdm.h>
  16. #include "..\INCLUDE\PLUGS.H"
  17.  
  18. // prototypes
  19.  
  20. EXC NTSTATUS
  21. DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath);
  22.  
  23. VOID
  24. PLUGS_Unload(IN PDRIVER_OBJECT DriverObject);
  25.  
  26.  
  27. NTSTATUS
  28. DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
  29. {
  30.     NTSTATUS    ntStatus = STATUS_SUCCESS;
  31.  
  32.     DriverObject->DriverUnload = PLUGS_Unload;
  33.  
  34.     return ntStatus;
  35. }
  36.  
  37. VOID
  38. PLUGS_Unload(IN PDRIVER_OBJECT DriverObject)
  39. {
  40. }
  41.  
  42. /****************** WDM Rountine End ****************/
  43.  
  44. // prototype
  45.  
  46. BOOL cmd_Hello( int argc,char** argv ) ;
  47.  
  48. // end
  49.  
  50. PLUGS_API* api = 0 ;
  51. // Call TRW2000 API must like this:
  52. //      api->Add_Command ( ) ;
  53.  
  54. EXC EXPORT BOOL Plugs_Init ( PLUGS_API* plugsapi)
  55. {
  56.     api=plugsapi;    
  57.  
  58.     api->Add_Command (    "HELLO" , 0 ,
  59.                 "A test command for Plugs Developer" ,0,
  60.                 cmd_Hello ) ;
  61.  
  62.     api->dprintf ( "Hello Plugs Ver 0.01 Initialized..." ) ;
  63.  
  64.     return TRUE ;
  65. }
  66.  
  67. EXC EXPORT BOOL Plugs_Exit ( )
  68. {
  69.     return TRUE ;
  70. }
  71.  
  72. /***************** Command ***************/
  73.  
  74.  
  75. // Command : HELLO
  76.  
  77. BOOL cmd_Hello( int argc,char**argv )
  78. {
  79.     if ( argc!=0 )
  80.         return FALSE ;
  81.  
  82.     api->dprintf ( " Hello World ! I'm `here`..." ) ;
  83.  
  84.     return TRUE ;
  85. }
  86.  
  87.